<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="Description" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" />
  </head>
  <body>
    <div id="app"></div>
    <script>
      window.$docsify = {
        name: "",
        repo: "",
        loadSidebar: true,
        auto2top: true,
         autoHeader: true, 
      };
    </script>
    <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
    <script>
   let currentAudio = null;
const loopCount = 50;
let currentLoopCount = 0;
onmousedown = function (event) {
    var url = event.srcElement.href;
    if (url && url.indexOf("https://dict.youdao.com/dictvoice") > -1) {

        event.preventDefault()
        event.srcElement.onclick = function (e) {
            e.preventDefault();
            return false;
        }
        currentAudio = new Audio(url);
        currentLoopCount = 0;
        currentAudio.onended = function () {
            if (currentLoopCount < loopCount) {
                currentLoopCount++;
                setTimeout(v => currentAudio.play(), 500);

            }
        }
        currentAudio.play(); 
        return false;
    }
}
    </script>
  </body>
</html>
